debian/rules: use UPSTREAM_VERSION_ABI to refer to version specific library
authorDrew Parsons <dparsons@debian.org>
Wed, 28 Jan 2026 11:49:12 +0000 (12:49 +0100)
committerDrew Parsons <dparsons@debian.org>
Wed, 28 Jan 2026 11:52:50 +0000 (12:52 +0100)
Currently 9.5, defining package libvtk9.5.

Needed to fix handling of Qt modules
(don't delete Qt files from qt component packages)

debian/changelog
debian/rules

index 189c6fe3f607fb2f56636f67f37eefc13ef4f3d4..408e82b5de162f1524354208d967b4cde254942c 100644 (file)
@@ -1,3 +1,10 @@
+vtk9 (9.5.2+dfsg3-4) UNRELEASED; urgency=medium
+
+  * debian/rules: use UPSTREAM_VERSION_ABI (currently 9.5) to refer to
+    version specific library (i.e. libvtk9.5) to fix handling of Qt modules
+
+ -- Drew Parsons <dparsons@debian.org>  Wed, 28 Jan 2026 12:46:48 +0100
+
 vtk9 (9.5.2+dfsg3-3) unstable; urgency=medium
 
   * Team upload.
index 1a4abddd95fae04bf3617eee2f346bce0ea4357f..138ecbaeb38628f1e5b4ee740b90bf8a15c627a9 100755 (executable)
@@ -3,6 +3,10 @@ BUILDDIR = $(CURDIR)/debian/build
 
 include /usr/share/dpkg/architecture.mk
 
+UPSTREAM_VERSION = $(shell dpkg-parsechangelog | awk '/^Version:/ { sub("-[^-]*$$", "", $$2); print $$2}')
+UPSTREAM_VERSION_ABI = $(shell echo $(UPSTREAM_VERSION) | sed -e 's/[\.\+]dfsg.*$$//' | awk 'BEGIN { FS="."}; {print $$1"."$$2 }')
+
+
 nojava_archs=hppa
 nojava_os=hurd
 ifeq (,$(filter $(DEB_BUILD_ARCH), $(nojava_archs))$(filter $(DEB_BUILD_ARCH_OS), $(nojava_os)))
@@ -145,7 +149,7 @@ execute_after_dh_install:
        rm -rf $(CURDIR)/debian/tmp/usr/share/licenses
        find $(CURDIR)/debian/libvtk9-dev/ -name "*Qt*" -delete || true
        find $(CURDIR)/debian/libvtk9-dev/usr/include/ -name "Q*" -delete || true
-       find $(CURDIR)/debian/libvtk9*/ -name "*Qt*" -delete || true
+       find $(CURDIR)/debian/libvtk$(UPSTREAM_VERSION_ABI)/ -name "*Qt*" -delete || true
        find $(CURDIR)/debian/tmp/usr/share/doc/vtk-*/doxygen -name "_formulas.log" -delete || true
        find $(CURDIR)/debian/build/Utilities/Doxygen/doc/html -name "_formulas.log" -delete || true